<?php
include("ZCreditProxy.php");

                   
$manuy_row = ( isset($_GET['manuyRow']) ? $_GET['manuyRow'] : "");
$manuy_number = ( isset($_GET['manuy_number']) ? $_GET['manuy_number'] : "");
$create_2 = ( isset($_GET['create_2']) ? $_GET['create_2'] : "");
$state = ( isset($_GET['state']) ? $_GET['state'] : "");
$agent_person_number = ( isset($_GET['agent_person_number']) ? $_GET['agent_person_number'] : "");
$person_number = ( isset($_GET['person_number']) ? $_GET['person_number'] : "");
$from_2 = ( isset($_GET['from_2']) ? $_GET['from_2'] : "");
$until = ( isset($_GET['until']) ? $_GET['until'] : "");
$manufacturer = ( isset($_GET['manufacturer']) ? $_GET['manufacturer'] : "");
$model = ( isset($_GET['model']) ? $_GET['model'] : "");
$license_plate = ( isset($_GET['license_plate']) ? $_GET['license_plate'] : "");
$production_year = ( isset($_GET['production_year']) ? $_GET['production_year'] : "");
$product_desc = ( isset($_GET['product_desc']) ? $_GET['product_desc'] : "");
$total_payment = ( isset($_GET['total_payment']) ? $_GET['total_payment'] : "");
//$total_payment=1;
//$itemDetails=$manuy_row.",".$manuy_number.",".$create_2.",".$state.",".$agent_person_number.",".$person_number.",".$from_2.",".$until.",".$manufacturer.",".$model.",".$license_plate.",".$production_year.",".$product_desc.",".$total_payment;
$itemDetails=$product_desc;
//$itemDetails="";


$manuy_row = ( isset($_GET['manuyRow']) ? $_GET['manuyRow'] : "");
$manuy_number = ( isset($_GET['manuy_number']) ? $_GET['manuy_number'] : "");
$manuyDetails = $manuy_row."A".$manuy_number;




//if(isset($_REQUEST['run']))
{	
	try
	{
		// Call pay method
		ZCreditHelper::Pay("2646788015", 
						   "cha122 ",
                        
                        	//	ZCreditHelper::Pay("0963222014", 
				//		   "testws", 
						   $total_payment, 
						   3,  //quantity
						   Languages::Hebrew, 
						   CurrencyType::NIS, 
						   $manuyDetails,
						   $itemDetails, 
						   1, 
						   "http://mazuz.org/chakin/ZCredit/chakin.jpg",
						   "http://mazuz.org/chakin/tanks.html", 
						   "http://mazuz.org/chakin/ZCredit/Response.php", 
						   true, 
						   false, 
						   false, 
						   false);
		exit();
	}
	catch (ZCreditException $zex)
	{
		$e = $zex->getPrevious();
		if($e != null)
		{
			echo $e->getMessage();
		}else
		{
			echo $zex->getMessage();
		}
	}
	catch (Exception $ex)
	{
		echo $ex->getMessage();
	}
}
?>
